package com.pro.controller;

import com.pro.pojo.JsCourseJournal;
import com.pro.pojo.JsonData;
import com.pro.service.JsCourseJournalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Author 祖铭泽
 * @Date 2022/1/15/0015
 * @description 历史价格详情 控制层
 */
@Controller
@RequestMapping(value = "/courseJournal")
public class JsCourseJournalController {
    @Autowired
    private JsCourseJournalService jsCourseJournalService;
    /**
     * @Author 祖铭泽
     * @Date 2022/1/15/0015
     * @description 添加课程历史详情记录
     */
    @RequestMapping(value = "/addCourseHistoryDetails")
    @ResponseBody
    public JsonData addCourseHistoryDetails(JsCourseJournal jsCourseJournal){
        return jsCourseJournalService.addCourseHistoryDetails(jsCourseJournal);
    }
    /**
     * @Author 祖铭泽
     * @Date 2022/1/15/0015
     * @description 根据课程id、课程名字、操作时间查询课程历史详情记录
     */
    @RequestMapping(value = "/getCourseHistoryDetails")
    @ResponseBody
    public JsonData getCourseHistoryDetails(JsCourseJournal jsCourseJournal) {
        return jsCourseJournalService.getCourseHistoryDetails(jsCourseJournal);
    }

}
